﻿<!--                                                             -->
<!-- Copyright (C) Microsoft Corporation. All rights reserved.   -->
<!--                                                             -->


<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:presenters="clr-namespace:Microsoft.LibraryManagerDemo.Presenters">

    <!-- Represents the default view for the  IconPickerPresenter presenter -->
    <DataTemplate DataType="{x:Type presenters:IconPickerPresenter}">
        <ListBox ItemsSource="{Binding Path=IconStock}"
                 IsSynchronizedWithCurrentItem="True"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                 Background="Transparent"
                 BorderBrush="Transparent"
                 Margin="4">

            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Image Stretch="Fill" Source="{Binding BitmapSource}" />
                </DataTemplate>
            </ListBox.ItemTemplate>

            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel ItemWidth="32" ItemHeight="32" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>

        </ListBox>

    </DataTemplate>

</ResourceDictionary>